import Vue from 'vue'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n

import '@/styles/index1.css'
import App from './App'
import store from './store'
import router from './router'
import request from '@/utils/request'
import RightToolbar from "@/components/RightToolbar"
import Pagination from "@/components/Pagination";
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, download, handleTree, filterForm } from "@/utils/ruoyi";


import '@/icons' // icon

// set ElementUI lang to EN
Vue.use(ElementUI, { locale,size: 'small' })

Vue.prototype.req = request

// 全局方法挂载
Vue.prototype.parseTime = parseTime
Vue.prototype.resetForm = resetForm
Vue.prototype.addDateRange = addDateRange
Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.download = download
Vue.prototype.handleTree = handleTree
Vue.prototype.msgSuccess = function (msg) {
  this.$message({ showClose: true, message: msg, type: "success" });
}

Vue.config.productionTip = false

// 全局组件挂载
Vue.component('Pagination', Pagination)
Vue.component('RightToolbar', RightToolbar)

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
